<div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title"><?php echo $this->translate('选择单页文章')?></h4>
    </div>
    <div class="modal-body box-body table-responsive no-padding">
        <table class="table table-hover">
            <thead>
            <tr>
                <td colspan="5">
                    <div class="col-xs-12 form-group">
                        <div class="col-sm-8">
                            <input type="text" name="searchCmsTitle" id="searchCmsTitle" class="form-control input-sm" placeholder="<?php echo $this->translate('输入全部或部分文章标题')?>" value="<?php echo $this->searchCmsTitle; ?>">
                        </div>
                        <div>
                            <button type="button" class="btn btn-primary btn-sm" onclick="searchCms();"><?php echo $this->translate('搜索'); ?></button>
                        </div>
                    </div>

                </td>
            </tr>
            <tr>
                <th width="2%"></th>
                <th width="10%"><?php echo $this->translate('文章ID'); ?></th>
                <th><?php echo $this->translate('文章名称'); ?></th>
                <th width="10%"><?php echo $this->translate('操作'); ?></th>
            </tr>
            </thead>
            <tbody>
            <?php if($this->cmsList->getCurrentItemCount() > 0) foreach ($this->cmsList as $cmsValue) { ?>
                <tr>
                    <td><input name="selectCmsId[]" value="<?php echo $cmsValue->getSingleCmsId(); ?>" type="checkbox" class="minimal"></td>
                    <td><?php echo $this->escapeHtml($cmsValue->getSingleCmsId()); ?></td>
                    <td><?php echo $this->escapeHtml($cmsValue->getSingleCmsTitle()); ?></td>
                    <td><button type="button" class="btn btn-primary btn-sm" onclick="addSelectCms(<?php echo $cmsValue->getSingleCmsId(); ?>);"><?php echo $this->translate('点击添加')?></button></td>
                </tr>
            <?php } ?>
            </tbody>
            <tfoot>
            <tr>
                <td colspan="5">
                    <?php echo $this->paginationControl($this->cmsList,
                        'Sliding',
                        'layout/ajaxPage',
                        ['route' => 'cms-single', 'params' => ['action' => 'ajaxCmsSearch'], 'showDivId' => 'addCmsListBody']); ?>
                </td>
            </tr>
            </tfoot>

        </table>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-primary btn-sm" onclick="addMoreSelectCms();"><?php echo $this->translate('添加选择的文章'); ?></button>
        <button type="button" class="btn btn-default btn-sm" data-dismiss="modal"><?php echo $this->translate('关闭'); ?></button>
    </div>
</div>